package com.lingnuo.service.Impl;

import com.lingnuo.mapper.AdminMapper;
import com.lingnuo.pojo.Admin;
import com.lingnuo.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {
    // 自动注入AdminMapper
    @Autowired
    private AdminMapper adminMapper;

    /**
     * 管理员登录
     *
     * @param admin 管理
     * @return {@code Admin }
     */
    @Override
    public Admin adminLogin(Admin admin) {
        return adminMapper.adminLogin(admin);
    }

    /**
     * 管理员注册
     *
     * @param admin 管理
     * @return int
     */
    @Override
    public int adminRegister(Admin admin) {
        return adminMapper.adminRegister(admin);
    }
}
